#include "slros_busmsg_conversion.h"


// Conversions between SL_Bus_smart_bridge_smart_msgs_data and smart_msgs::data

void convertFromBus(smart_msgs::data* msgPtr, SL_Bus_smart_bridge_smart_msgs_data const* busPtr)
{
  const std::string rosMessageType("smart_msgs/data");

  msgPtr->a1 =  busPtr->A1;
  msgPtr->a2 =  busPtr->A2;
  msgPtr->a3 =  busPtr->A3;
  msgPtr->a4 =  busPtr->A4;
  msgPtr->a5 =  busPtr->A5;
  msgPtr->a6 =  busPtr->A6;
  msgPtr->a7 =  busPtr->A7;
  msgPtr->a8 =  busPtr->A8;
}

void convertToBus(SL_Bus_smart_bridge_smart_msgs_data* busPtr, smart_msgs::data const* msgPtr)
{
  const std::string rosMessageType("smart_msgs/data");

  busPtr->A1 =  msgPtr->a1;
  busPtr->A2 =  msgPtr->a2;
  busPtr->A3 =  msgPtr->a3;
  busPtr->A4 =  msgPtr->a4;
  busPtr->A5 =  msgPtr->a5;
  busPtr->A6 =  msgPtr->a6;
  busPtr->A7 =  msgPtr->a7;
  busPtr->A8 =  msgPtr->a8;
}


// Conversions between SL_Bus_smart_bridge_smart_msgs_ptcl and smart_msgs::ptcl

void convertFromBus(smart_msgs::ptcl* msgPtr, SL_Bus_smart_bridge_smart_msgs_ptcl const* busPtr)
{
  const std::string rosMessageType("smart_msgs/ptcl");

  msgPtr->cmd =  busPtr->Cmd;
  convertFromBus(&msgPtr->dtx, &busPtr->Dtx);
  msgPtr->idx =  busPtr->Idx;
  msgPtr->ste =  busPtr->Ste;
}

void convertToBus(SL_Bus_smart_bridge_smart_msgs_ptcl* busPtr, smart_msgs::ptcl const* msgPtr)
{
  const std::string rosMessageType("smart_msgs/ptcl");

  busPtr->Cmd =  msgPtr->cmd;
  convertToBus(&busPtr->Dtx, &msgPtr->dtx);
  busPtr->Idx =  msgPtr->idx;
  busPtr->Ste =  msgPtr->ste;
}

